home *** CD-ROM | disk | FTP | other *** search
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Date: Tue, 24 May 94 11:37:57 +0200
- Message-Id: <9405240937.AA27394@issan.informatik.uni-dortmund.de>
- To: mint@atari.archive.umich.edu
- Subject: MiNTlib: adding strcasecmp and strncasecmp
-
- This patch adds the functions strcasecmp and strncasecmp, typically
- found on BSD systems, to the MiNTlib. Actually, they are already
- there, only misnamed :-).
-
- *** orig/stricmp.c Thu Sep 17 12:48:28 1992
- --- stricmp.c Mon May 23 14:26:24 1994
- ***************
- *** 13,18 ****
- --- 13,19 ----
-
- #ifdef __GNUC__
- asm(".stabs \"_strcmpi\",5,0,0,_stricmp"); /* dept of clean tricks */
- + asm(".stabs \"_strcasecmp\",5,0,0,_stricmp");
- #endif
-
- int /* <0 for <, 0 for ==, >0 for > */
- ***************
- *** 49,54 ****
- --- 50,63 ----
- #ifndef __GNUC__
- int
- strcmpi(scan1, scan2)
- + register const char *scan1;
- + register const char *scan2;
- + {
- + return stricmp(scan1, scan2);
- + }
- +
- + int
- + strcasecmp(scan1, scan2)
- register const char *scan1;
- register const char *scan2;
- {
- *** orig/strnicmp.c Thu Sep 17 12:48:32 1992
- --- strnicmp.c Mon May 23 14:28:04 1994
- ***************
- *** 13,18 ****
- --- 13,19 ----
-
- #ifdef __GNUC__
- asm(".stabs \"_strncmpi\",5,0,0,_strnicmp"); /* dept of clean tricks */
- + asm(".stabs \"_strncasecmp\",5,0,0,_strnicmp");
- #endif
-
- int /* <0 for <, 0 for ==, >0 for > */
- ***************
- *** 55,60 ****
- --- 56,70 ----
- #ifndef __GNUC__
- int
- strncmpi(scan1, scan2, n)
- + register const char *scan1;
- + register const char *scan2;
- + size_t n;
- + {
- + return strnicmp(scan1, scan2, n);
- + }
- +
- + int
- + strncasecmp(scan1, scan2, n)
- register const char *scan1;
- register const char *scan2;
- size_t n;
-